home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / biz / dbase / dbstart.lha / dbStart / dbStart.rexx next >
OS/2 REXX Batch file  |  1997-03-25  |  755b  |  40 lines

  1. /* dbStart.rexx */
  2.  
  3. parse arg filename
  4. if filename='?' then
  5. do
  6.  call explain()
  7.  exit
  8. end
  9.  
  10. if filename="" then filename='ram:dbstart'
  11.  
  12. open('file',filename,'w')
  13. Options prompt '>field>'
  14. in="dummy"
  15. line=""
  16. tab=x2c(09)
  17. do forever
  18.     Parse pull post
  19.     in=post
  20.     if in="" then leave
  21.     if line="" then line=in
  22.     else line=line||tab||in
  23. end
  24. writeln('file',line)
  25. close('file')
  26. exit
  27.  
  28.  
  29. explain: procedure
  30. say
  31. say "The purpose of the program is to write the first line in"
  32. say "the program, especially if the editor can't handle tabs "
  33. say "properly."
  34. say "Call the program with the filename  of the new base f. ex."
  35. say "dbStart.rexx Work:db3.4:/myfile"
  36. say "At the prompt '>field>' the fieldnames are given one by one."
  37. say "After last field: 'Return' only."
  38. say
  39. return
  40.